<?php
namespace app\admin\model;
use app\admin\BaseModel;
class AuthGroup extends BaseModel
{
    public function getAddtimeAttr($v,$d)
    {
        $v = date('Y-m-d H:i:s',$v);
        return $v;
    }

    public static function getAuthGroupList()
    {
        return AuthGroup::field(true)->paginate([
            'list_rows'=>5
        ]);
    }

    public static function getRulesAttr($v,$d)
    {
        $v = explode(',',$v);
        return $v;
    }

    public static function getAuthGroupValue($id)
    {
        return AuthGroup::find($id);
    }
}